import requests

headers = {
    "Accept": "application/json, text/plain, */*",
    "Accept-Language": "zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6",
    "Connection": "keep-alive",
    "Content-Type": "text/xml;charset=UTF-8",
    "Origin": "https://www.ccprec.com",
    "Referer": "https://www.ccprec.com/projectSecPage/",
    "Sec-Fetch-Dest": "empty",
    "Sec-Fetch-Mode": "cors",
    "Sec-Fetch-Site": "same-origin",
    "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36 Edg/142.0.0.0",
    "sec-ch-ua": "\"Chromium\";v=\"142\", \"Microsoft Edge\";v=\"142\", \"Not_A Brand\";v=\"99\"",
    "sec-ch-ua-mobile": "?0",
    "sec-ch-ua-platform": "\"Windows\""
}
url = "https://www.ccprec.com/honsanCloudAct"
proxies = {
    "http": None,
    "https": None,
}
import subprocess
from functools import partial

subprocess.Popen = partial(subprocess.Popen, encoding="utf-8")
import execjs

with open("17.js", "r", encoding="utf-8") as f:
    js_code = f.read()
# 编译 JS 代码
ctx = execjs.compile(js_code)
# 调用解密函数
data = ctx.call("getRequestParam", 2)
response = requests.post(url, headers=headers, data=data, proxies=proxies)
print(response.text)
res = ctx.call("getDecodeRequest", response.text)
print(res)
